import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-09-26
 * Time:17:56
 */
public class TestDemo {
    public static void fun(String str) {
        char[] arr = new char[58];
        //将字符串中的的元素按照ascall值存入到arr数组中,每出现一次就加加
        for (int i = 0; i < str.length(); i++) {
            arr[str.charAt(i) - 65] += 1;
        }
        //遍历数组中值>=1的元素，若遍历完成就另她等于0
        for (int i = 0; i < str.length(); i++) {
            if (arr[str.charAt(i) - 65] >= 1) {
                System.out.print(str.charAt(i));
                arr[str.charAt(i) - 65] = 0;
            }
        }
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while(sc.hasNextLine()){
            String str=sc.nextLine();
            fun(str);
        }


        }




}
